/*
 *  This file is part of Spidex.
 *  
 *  Spidex is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  Spidex is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with Spidex.  If not, see <http://www.gnu.org/licenses/>.
 */

package spidex.posterSearcher;

import javax.swing.SwingWorker;
import spidex.FilmInfoInterface;

/**
 *
 * @author xkucer11
 */
public class CSFDPosterSearcherInfoWorker extends 
        SwingWorker<Void,Void> {
    private PosterSearcher searcher;
    private FilmInfoInterface info;
    public CSFDPosterSearcherInfoWorker(
            PosterSearcher searcher, FilmInfoInterface info) {
        this.searcher = searcher;
        this.info = info;
    }
    @Override
    protected Void doInBackground() throws Exception {
        System.out.println("InfoThread started");
        searcher.findInformation(info);
        return null;
    }
    
    @Override
    protected void done() {
//        this.info = null;
        System.out.println("InfoWorker finished");
    }   
}
